"""
#!/usr/bin/python3
# coding:utf-8            
#
# Copyright (C) 2024 - 2024 Jasonakeke， Inc. All Rights Reserved 
# @Desc	   ：负责整个项目的配置信息
# @Time    : 2024/11/3 21:21
# @Author  : Code_By_Jasonakeke
# @Email   : 2284037977@qq.com
# @File    : default.py
# @IDE     : PyCharm
"""


class Config:
	# 配置数据库和 SQLalchemy
	HOSTNAME = '127.0.0.1'
	PORT = '3306'
	DATABASE = 'test2'
	USERNAME = 'root'
	PASSWORD = '123456'
	DB_URI = 'mysql+pymysql://{username}:{password}@{host}:{port}/{database}?charset=utf8mb4'.format(username = USERNAME,
	                                                                                                 password = PASSWORD,
	                                                                                                 host = HOSTNAME,
	                                                                                                 port = PORT,
	                                                                                                 database = DATABASE)

	SQLALCHEMY_DATABASE_URI = DB_URI
	# 禁止自动追踪数据库的修改情况
	SQLALCHEMY_TRACK_MODIFICATIONS = False

	# 日志配置
	# 默认日志级别
	LOGGING_LEVEL = 'DEBUG'
	# 默认日志目录名
	LOGGING_FILE_DIR = 'logs/'
	# 默认日志文件大小
	LOGGING_FILE_MAX_BYTES = 300 * 1024 * 1024
	# 默认日志文件保存数量
	LOGGING_FILE_BACKUP = 10


# 开发环境配置
class DevelopmentConfig(Config):
	DEBUG = True
	# 打印 sql
	SQLALCHEMY_ECHO = True

class ProductConfig(Config):
	pass
